unit uDataModule;

interface

uses
  System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option,
  FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
  FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Comp.Client,
  Data.DB, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
  FireDAC.Comp.DataSet, FMX.Dialogs, FireDAC.FMXUI.Wait, FireDAC.Comp.UI,
  FireDAC.Phys.IBBase, FireDAC.Phys.IB;

type
  TPPDBDM = class(TDataModule)
    FDConnection: TFDConnection;
    FDTransaction1: TFDTransaction;
    FDTable1: TFDTable;
    FDPhysIBDriverLink1: TFDPhysIBDriverLink;
    FDGUIxWaitCursor1: TFDGUIxWaitCursor;
    FDTable1ID: TIntegerField;
    FDTable1PLAYER_NAME: TStringField;
    FDTable1TOTAL_VICTORIES: TIntegerField;
    FDTable1TOTAL_DEFEATS: TIntegerField;
    FDTable1STATS_SERVICE: TIntegerField;
    FDTable1STATS_TECHNIQUE: TIntegerField;
    FDTable1STATS_POWER: TIntegerField;
    FDTable1STATS_CURVE: TIntegerField;
    FDTable1STATS_AGGRESSIVENESS: TIntegerField;
    procedure FDConnectionBeforeConnect(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  PPDBDM: TPPDBDM;

implementation

{%CLASSGROUP 'FMX.Controls.TControl'}

{$R *.dfm}

procedure TPPDBDM.FDConnectionBeforeConnect(Sender: TObject);
begin
  FDConnection.Params.Values['Database'] := GetHomePath + PathDelim + 'Documents' + PathDelim + 'PPDB.IB';
  FDConnection.Params.Values['Protocol'] := 'Local';
  FDConnection.Params.Values['Server'] := '';
end;

end.
